using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace TreeControl
{
    /// <summary>
    /// Provides data for the HeaderedItem.NodeClicked events.
    /// </summary>
    public class NodeClickedEventArgs : EventArgs
    {
        #region Fields
        private string myId;
        private string myParentId;
        private string myGrandParentId;
        private bool myIsPause;
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the NodeClickedEventArgs class.
        /// </summary>
        /// <param name="id">ID of the HeaderedItem</param>
        public NodeClickedEventArgs(string id)
            : this(id, null, null, false)
        {

        }

        /// <summary>
        /// Initializes a new instance of the NodeClickedEventArgs class.
        /// </summary>
        /// <param name="id">ID of the HeaderedItem</param>
        /// <param name="parentId">ID of the Parent of HeaderedItem</param>
        public NodeClickedEventArgs(string id, string parentId)
            : this(id, parentId, null, false)
        {

        }

        /// <summary>
        /// Initializes a new instance of the NodeClickedEventArgs class.
        /// </summary>
        /// <param name="id">ID of the HeaderedItem</param>
        /// <param name="parentId">ID of the Parent of HeaderedItem</param>
        /// <param name="isPause">Indicates whether pause command is active</param>
        public NodeClickedEventArgs(string id, string parentId, bool isPause)
            : this(id, parentId, null, isPause)
        {

        }

        /// <summary>
        /// Initializes a new instance of the NodeClickedEventArgs class.
        /// </summary>
        /// <param name="id">ID of the HeaderedItem</param>
        /// <param name="parentId">ID of the Parent of HeaderedItem</param>
        /// <param name="grandparentId">ID of the Parent of HeaderedItem's Parent</param>
        public NodeClickedEventArgs(string id, string parentId, string grandparentId)
            : this(id, parentId, grandparentId, false)
        {

        }

        /// <summary>
        /// Initializes a new instance of the NodeClickedEventArgs class.
        /// </summary>
        /// <param name="id">ID of the HeaderedItem</param>
        /// <param name="parentId">ID of the Parent of HeaderedItem</param>
        /// <param name="grandparentId">ID of the Parent of HeaderedItem's Parent</param>
        /// <param name="isPause">Indicates whether pause command is active</param>
        public NodeClickedEventArgs(string id, string parentId, string grandparentId, bool isPause)
        {


            myId = id;
            myParentId = parentId;
            myGrandParentId = grandparentId;
            myIsPause = isPause;


        }

        #endregion

        #region Properties
        /// <summary>
        /// Gets whether the pause command is active
        /// </summary>
        public bool IsPause
        {
            get { return myIsPause; }
        }

        /// <summary>
        /// Gets the ID of the HeaderedItem
        /// </summary>
        public string Id
        {
            get { return myId; }
        }

        /// <summary>
        /// Gets the ID of the Parent of HeaderedItem
        /// </summary>
        public string ParentId
        {
            get { return myParentId; }
        }

        /// <summary>
        /// Get the ID of Parent of HeaderedItem's Parent
        /// </summary>
        public string GrandparentId
        {
            get
            {
                return myGrandParentId;
            }
        }

        #endregion
    }
}
